JSP Samples requires Apache Tomcat 6 or higher to be installed. Apache Ant™ 1.9 or higher and Java JDK 1.6 is required compile the sample WAR file.
The structure of the JSP samples is described in following table:
build.xml | Ant build script. |
Sample/ | Web module with JSP and Java code. |
Sample/public_html/ | Web resources folder, it stores the JSP sample files. |
Sample/public_html/flash | JSP code and configuration specific to the Flash viewer. |
Sample/public_html/html5 | JSP code and configuration specific to the HTML5 viewer. |
Sample/public_html/WEB-INF/lib/ | Sample web application runtime libraries folder. |
Sample/src | Jave code for supporting both HTML5 and Flash viewers. |
deploy/ | Folder contains compiled and assembled code, i.e. prizmccplusjsp.war. |
Use following files to configure the web application:
-
public_html/html5/index.jsp – main JSP page containing JS code that loads the HTML5 viewer application.
-
public_html/flash/index.jsp - main JSP page containing JS code that loads the Flash viewer application.
-
public_html/WEB-INF/web.xml – J2EE web application configuration file. This file used to configure handling of the web request and web application settings.
It might be necessary to configure the values in web.xml to fit your local Prizm Service installation.
Following table describes the Prizm configuration parameter values and its purpose:
Parameter Name (param-name) | Parameter Value (param-value) | Description |
EnableDocumentPath |
|
When set to True, this parameter restricts the web tier samples to load documents from the path specified by DocumentPath. Otherwise, it allows loading documents from any path. |
DocumentPath |
|
Path where the source documents are located. |
MarkupsPath |
|
Path where the temporary markup files are located. |
WebServiceScheme | http | PCCIS REST API web service scheme. |
WebServiceHost | localhost | PCCIS REST API web service hostname. |
WebServicePath | PCCIS/V1 | PCCIS REST API web service path. |
WebServicePort | 18681 | PCCIS REST API web service port number. |
The JSP samples can be compiled using Apache Ant™ compiler.
On Windows, this can be achieved by executing the following set of commands on command line terminal (cmd.exe):
Copy Code | |
---|---|
cd C:\Prizm\Samples\PCCIS\jsp set ANT_HOME=C:\apache-ant-1.9.0 set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_43 set PATH=%PATH%;%ANT_HOME%\bin;%JAVA_HOME%\bin; ant clean ant war |
Note that the above example commands assume:
-
Apache Ant™ is installed in C:\apache-ant-1.9.0\
-
Java JDK is installed in C:\Program Files\Java\jdk1.6.0_43\
-
Prizm is installed in C:\Prizm\
On Linux, please refer to documentation how to install Apache Ant™ as described at http://ant.apache.org/manual/index.html.
Then, issue the ant compiler commands inside JSP sample root folder, e.g.:
Copy Code | |
---|---|
# cd /usr/share/prizm/Samples/PCCIS/jsp/ # ant clean # ant war |
The result of a successful build is the PCCSample.war file located in target folder under JSP sample root folder.
Follow the Tomcat documentation instructions on how to redeploy newly compiled PCCSample.war.